var app = getApp();
Page({
  data:{
    tequan:[],
  },
  onLoad:function(){
    var openid = wx.getStorageSync("openid");
    var that = this;
    wx.request({
      url: 'https://www.mamingwang.cn/api/index/chenggong',
      data:{
        openid:openid
      },
      method:"post",
      success(res){
        console.log(res)
        res.data.data[0].card = "******************";
        that.setData({
          message:res.data.data[0]
        })
      }
    })
    //查询特权
    wx.request({
      url: 'https://www.mamingwang.cn/api/index/privilege',
      data: {
        openid: openid
      },
      method: "post",
      success(res) {
        that.setData({
          tequan: res.data.message
        })
      }
    })
  },
  //返回我的主页
  goMyPage: function() {
    wx.navigateBack({
      detail: 1     
    })
  }
})